-
Notifications
You must be signed in to change notification settings - Fork 32
[WIP] Add basic API for certificate validation #1655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: peras-staging
Are you sure you want to change the base?
Conversation
The PR still needs a lot of work, but I think it would be good to get some early feedback on 7212954. I pushed a bunch of changes adapting call sites to use
Based on my current understanding, there is a tension between keeping either
Do you think (1) is the right approach here? Or is (2) something more akin to what we would want at this stage in the dev cycle? |
c5beff6
to
7212954
Compare
I think (1) is indeed the right approach, the benefits seem compelling even at this stage. (In the standup, we just briefly talked about some of the implications this has once we store certificates on disk, such as whether we also want to store the weight boost of a certificate on disk, or recompute it on startup. But this is not important for now.)
This is actually a desired outcome of this change, see the last paragraph in the issue description of #94. To keep this PR minimal, still always using |
7212954
to
4f487d9
Compare
...ros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/ChainDB/Impl/Background.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Block/SupportsPeras.hs
Outdated
Show resolved
Hide resolved
defaultPerasCfg :: PerasCfg blk | ||
defaultPerasCfg = PerasCfg{perasCfgWeightBoost = boostPerCert} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another value that will have to be computed upon some external parameters, IIUC.
...ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ObjectDiffusion/ObjectPool/PerasCert.hs
Outdated
Show resolved
Hide resolved
...ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ObjectDiffusion/ObjectPool/PerasCert.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/PerasCertDB/Impl.hs
Outdated
Show resolved
Hide resolved
...ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ObjectDiffusion/ObjectPool/PerasCert.hs
Outdated
Show resolved
Hide resolved
...sensus/src/ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ObjectDiffusion/PerasCert.hs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file also shouldn't change
3e437fe
to
2cbdb3e
Compare
-- | Current round number | ||
PerasRoundNo -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want to remove this again; I can't think of any block-specific criterion that would involve the current round number. So let's rather keep the API as simple as possible (it will get more complicated in the future when we add LedgerState
-derived input).
...ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ObjectDiffusion/ObjectPool/PerasCert.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/test/storage-test/Test/Ouroboros/Storage/ChainDB/Model.hs
Outdated
Show resolved
Hide resolved
ouroboros-consensus/src/ouroboros-consensus/Ouroboros/Consensus/Storage/PerasCertDB/Impl.hs
Show resolved
Hide resolved
...ouroboros-consensus/Ouroboros/Consensus/MiniProtocol/ObjectDiffusion/ObjectPool/PerasCert.hs
Show resolved
Hide resolved
062b507
to
750e881
Compare
750e881
to
0857d5f
Compare
Closes tweag/cardano-peras#94